<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class HRSPegawai extends CorePerson {
    protected $mNIP;
    
    public function __construct($pNIP = null) {
        if(!is_null($pNIP) ){
            $this->mNIP= $pNIP;
            $this->GetDetailPegawai();
        }
    }
    
    protected function GetDetailPegawai() {
        echo 'masuk';
        $tResult = array();
        $mQueryMhs = new DBQueryExecute();

        $tSQL = "SELECT id_person FROM view_hrs_pegawai WHERE nip=\"" . $this->mNIP . "\" "; //echo $tSQL;
        $tRes = $mQueryMhs->Execute($tSQL);

        if ($tRes->Count() > 0) {
            $tRes->MoveFirst();
            
            $this->mPersonId = $tRes->id_person;
            $this->GetDetailPerson();
        }
        else
            return false;
    }
    
        
    public function GenerateNIP($pBool) {
        $this->mIsAutoNIP= $pBool;
    }
    
    
    public function GetNIP() {
        return $this->mNIP;
    }

    
}
?>
